package gdut.stream.last;

import java.util.ArrayList;
import java.util.function.Predicate;

public class AnyMatchLamda {
    public static void main(String[] args) {
        ArrayList<Integer> integers = new ArrayList<>();
        for (int i = 0; i < 100; i++) {
            integers.add(i);
        }
//        只要流中有一个元素符合某个条件就返回true，如果全部不符合就返回false
        boolean resFlag = integers.stream()
                .anyMatch(integer -> integer > 77);
        System.out.println(resFlag);
    }
}
